;-------------------------------------------------------------LICENSE--------------------------------------------------------------;
;                                                                                                                                  ;
;The MAP code is written in Fortran language for magnetohydrodynamics (MHD) calculation with the adaptive mesh refinement (AMR)    ;
;and Message Passing Interface (MPI) parallelization.                                                                              ;
;                                                                                                                                  ;
;Copyright (C) 2012                                                                                                                ;
;Ronglin Jiang                                                                                                                     ;
;rljiang@ssc.net.cn                                                                                                                ;
;585 Guoshoujing Road. Pudong, Shanghai, P.R.C. 201203                                                                             ;
;                                                                                                                                  ;
;This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License         ;
;as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.             ;
;                                                                                                                                  ;
;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of    ;
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.                        ;
;                                                                                                                                  ;
;You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software     ;
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.                                                   ;
;                                                                                                                                  ;
;-------------------------------------------------------------LICENSE--------------------------------------------------------------;

pro usr_color, COLOR = color

   if n_elements(color) eq 0 then color = 1

   device, decomposed = 0
   case (color) of
      1:begin
;        red = [  0,   0,   0,   0, 255, 255]
;      green = [  0,   0, 255, 255, 255, 255]
;       blue = [  0, 255, 255,   0,   0, 255]
;0  255   0     255   120   255   0     255
;0  100   255   255   120   0     255   255
;0  200   0     0     255   0     255   255
;        red = [  0,   0, 255, 255, 255,   0,   0, 255]
;      green = [  0, 255,   0, 255,   0, 255,   0, 255]
;       blue = [  0, 255, 255,   0,   0,   0, 255, 255]
        red = [  0,   0,   0,   0, 255, 255, 255, 255]
      green = [  0,   0, 255, 255, 255,   0,   0, 255]
       blue = [  0, 255, 255,   0,   0,   0, 255, 255]
      end

      2:begin
        red = [255, 255, 0, 0, 0, 0]
      green = [255, 255, 0, 0, 0, 0]
       blue = [255,   0, 0, 0, 0, 0]
      end

      3:begin
        red = [0, 0, 255, 255]
      green = [0, 0, 255, 255]
       blue = [0, 0,   0, 255]
      end
   endcase

   tvlct, congrid(red, 256, /interp, /minus_one), congrid(green, 256, /interp, /minus_one), congrid(blue, 256, /interp, /minus_one)

end
